package com.buss.common.entity;
// Generated 2016-2-24 14:10:58 by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * HxArticle generated by hbm2java
 */
@Entity
@Table(name = "hx_article", catalog = "hxclub")
public class HxArticle implements java.io.Serializable {

	private java.lang.Long id;
	private java.lang.Long cid;
	private String title;
	private String keywords;
	private String summary;
	private String source;
	private String editor;
	private String imgUrl;
	private String videoUrl;
	private Integer status;
	private Date createTime;
	private Date updateTime;
	private Integer levelclass;
	private Date publishTime;

	private HxArticleDetail articleDetail;


//	@Id
//	@Column(name = "id")
//	@GeneratedValue(generator="incrementGenerator", strategy=GenerationType.IDENTITY)  
//  @GenericGenerator(name="incrementGenerator", strategy="increment")
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public java.lang.Long getId() {
		return id;
	}
	
	public void setId(java.lang.Long id) {
		this.id = id;
	}

//	@ManyToOne(fetch = FetchType.LAZY)
//	@JoinColumn(name = "cid")
//	public HxArticleCat getHxArticleCat() {
//		return this.hxArticleCat;
//	}
//
//	public void setHxArticleCat(HxArticleCat hxArticleCat) {
//		this.hxArticleCat = hxArticleCat;
//	}

	@Column(name = "cid",  insertable=false, updatable=false)
	public java.lang.Long getCid() {
		return cid;
	}
	
	public void setCid(java.lang.Long cid) {
		this.cid = cid;
	}
	

	@Column(name = "title")
	public String getTitle() {
		return this.title;
	}



	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "summary")
	public String getSummary() {
		return this.summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	@Column(name = "source")
	public String getSource() {
		return this.source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	@Column(name = "editor")
	public String getEditor() {
		return this.editor;
	}

	public void setEditor(String editor) {
		this.editor = editor;
	}

	@Column(name = "img_url")
	public String getImgUrl() {
		return this.imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	@Column(name="video_url")
	public String getVideoUrl() {
		return videoUrl;
	}

	public void setVideoUrl(String videoUrl) {
		this.videoUrl = videoUrl;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@OneToOne(targetEntity=HxArticleDetail.class, cascade=CascadeType.ALL)
	@PrimaryKeyJoinColumn
	public HxArticleDetail getArticleDetail() {
		return articleDetail;
	}

	public void setArticleDetail(HxArticleDetail articleDetail) {
		this.articleDetail = articleDetail;
	}

	@Column(name = "keywords")
	public String getKeywords() {
		return keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}

	@Column(name = "levelclass")
	public Integer getLevelclass() {
		return levelclass;
	}

	public void setLevelclass(Integer levelclass) {
		this.levelclass = levelclass;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "publish_time", length = 19)
	public Date getPublishTime() {
		return publishTime;
	}

	public void setPublishTime(Date publishTime) {
		this.publishTime = publishTime;
	}
	
}
